<?php
$this->title = "Page d'accueil de la gestion d'articles" ;
$this->headTitle($this->title);
echo $this->profileLink();
?>

<p><a href="<?php echo $this->url(array('controller'=>'article',
        'action'=>'add'));?>">Ajouter de nouveaux articles</a></p>
<table>
    <tr>
        <th>Designation</th>
        <th>Prix</th>
        <th>&nbsp;</th>
    </tr>
	
	<?php foreach($this->articles as $article) : ?>
    <tr>
        <td><?php echo $this->escape($article->designation);?></td>
        <td><?php echo $this->escape($article->price);?></td>
        <td>
            <a href="<?php echo $this->url(array('controller'=>'article',
                'action'=>'update', 'id'=>$article->id));?>">Modifier</a>
            <a href="<?php echo $this->url(array('controller'=>'article',
                'action'=>'delete', 'id'=>$article->id));?>">Supprimer</a>
        </td>
    </tr>
<?php endforeach; ?>
</table>